package com.glsc.ngateway.common.base.repo.mysql.flowable;

import com.glsc.ngateway.common.base.domain.mysql.flowable.FlowableAssignee;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author lium
 * @date 2021/9/6
 */
public interface FlowableAssigneeRepo extends JpaRepository<FlowableAssignee, Long>, JpaSpecificationExecutor<FlowableAssignee> {

    @Query(value = "select m from FlowableAssignee m where m.processDefinitionKey = :processDefinitionKey and m.sysid = :sysid")
    List<FlowableAssignee> findByProcessDefinitionKey(@Param("processDefinitionKey") String processDefinitionKey
            , @Param("sysid") String sysid);
}
